//
//  iStageAppDelegate.m
//  iStage
//
//  Created by michael on 24/07/2008.
//  Copyright Legal Education Technology Lab 2008. All rights reserved.
//

#import "iStageAppDelegate.h"
#import "RootViewController.h"
#import	"DataManager.h";

@implementation iStageAppDelegate

@synthesize window;
@synthesize navigationController;


- (id)init {
	if (self = [super init]) {
		// 
	}
	return self;
}


- (void)applicationDidFinishLaunching:(UIApplication *)application {
	
	[DataManager readFromDisk]; /* Load data */
	// Configure and show the window
	[window addSubview:[navigationController view]];
	[window makeKeyAndVisible];
}


- (void)applicationWillResignActive:(UIApplication *)application
{
	[DataManager persistToDisk];
}
- (void)applicationWillTerminate:(UIApplication *)application {
	// Save data if appropriate
	[DataManager persistToDisk];
}


- (void)dealloc {
	[navigationController release];
	[window release];
	[super dealloc];
}

@end
